def printArgs (args: Array[String]): Unit = {
  args.foreach(println)
}

//printArgs(Array("tom", "kate", "jerry"))

val str = "123"
//print(str.mkString("\n"))

val strArr = Array("1", "45", "6789")
//print(strArr.mkString("\n"))

def printArgs2 (args: Array[String])/*: String */= args.mkString("\n")

//print(printArgs2(strArr))
//assert(false)

val ret = strArr.reduceLeft(
  (a, b) => if ( a.length < b.length ) a else b 
)

print(ret)
